package io.knifer.gokexceltask.service;

import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.Map;
import java.util.UUID;

public interface StudentService {
    /**
     * 根据Excel存储数据
     * @param file Excel文件
     * @param allowMiscDataAutoInsert 是否自动持久化非Student记录
     * @return 错误信息
     * @throws IOException IO相关异常
     */
    Map<String, String> saveByExcel(MultipartFile file, boolean allowMiscDataAutoInsert) throws IOException;

    /**
     * 导出为Excel
     * @return 文件名
     */
    UUID exportStudentDataAsExcel() throws IOException;

    /**
     * 导出mock的excel数据
     * @param rows 记录数
     * @return 文件名
     */
    UUID exportAndMockStudentDataAsExcel(int rows) throws IOException;
}
